<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .asd{
            box-sizing: border-box;
            width: 400px;
            height: 400px;
            border: 2px solid rgba(0, 0, 0, 0);
            transition: 4s;
            background: red;
        }
        .red{
            background: none;
            width: 0;
            border: 200px solid rgba(0,0,0,0);
            border-bottom-color: yellow;
            border-radius: 50%;
        }
        #but{
            border-radius: 20px;
            display: block;
            width: 80px;
            height: 80px;
            color: #0000ff;
            background: red;
            position: fixed;
            right: 0;
            top: 0;
            left: 0;
            bottom: 0;
            margin: auto;
            border: 0;
        }
    </style>
</head>
<body>
    <div class="asd"></div>
    <button id="but">点击</button>
</body>
</html>
<script>
    var all = document.querySelector('.asd')
        all1 = document.querySelector('#but')
    all1.onclick = function(){
        all.classList.toggle('red')
        // location.href="https://www.baidu.com"
    }
    console.log(all.parentElement);
</script>